﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Spring.Context;
using Spring.Context.Support;
using hello_library;

namespace hello_felix
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnSubmit_Click(object sender, EventArgs e)
        {
            IApplicationContext ctx = ContextRegistry.GetContext();
            hello_lib hello = (hello_lib)ctx.GetObject("HelloFelix");

            string name = this.txtShow.Text;
            
            if (string.IsNullOrEmpty(name)) name = "Felix Members";

            string result = hello.GetHelloingName(name);

            this.lblResult.Text = result;
        }

    }
}
